<template>
  <view>
    <swiper class="swiper" indicator-dots autoplay circular>
      <swiper-item v-for="(item, index) in swiperList" :key="index">
        <image :src="item.image" mode="aspectFill" class="swiper-image" style="height: 350upx"></image>
      </swiper-item>
    </swiper>
  </view>
</template>

<script>
export default {
  props: {
    // 接收父组件传递的轮播图数据
    swiperList: {
      type: Array,
      default: () => [], // 默认值为空数组
    },
  },
};
</script>

<style scoped>
.swiper {
  width: 100%;
  height: 350upx;
}

.swiper-image {
  width: 100%;
  height: 100%;
  border-radius: 10rpx;
}
</style>